The Config class contains all the method related to reader configuration. The resetFactoryDefaults method informs the reader to set all configurable values to factory defaults.
// Reset to Factory defaults
reader.Config.resetFactoryDefaults();
The set of functions are available for controlling the GPIO ports of the Reader. The number of GPIs and GPOs supported by the reader can be queried from the reader capabilities. In general sensors will be connected to input ports and indicator or lights will be connected to output ports.
a. GPI (General Purpose Input) Port
The function getPortState gets the current GPI port state of the reader. The specified port can be accessed by passing the index.
The function isPortEnabled can be used to get the current configuration and state of the specified port number. The specified port can be accessed by passing the index.
The function enablePort enables the specified port number. It is possible to register for GPI Port state change notification. Before registering, the interested port must be enabled
// Get numer of GPI ports supported by Reader
int numGPIPorts = reader.ReaderCapabilities.getNumGPIPorts();
// Enable GPI port 1
reader.Config.GPI.enablePort(1, true);
// To Query the GPI Port 1
boolean portEnabled = reader.Config.GPI.isPortEnabled(1);
// To get the GPI Port State
GPI_PORT_STATE gpiPortState = reader.Config.GPI.getPortState(1);
b. GPO (General Purpose Output) Port
The function getPortState gets the current ouput port state of the reader. The specified port can be accessed by passing the index.
// Get numer of GPO ports supported by Reader
int numGPOPorts = reader.ReaderCapabilities.getNumGPOPorts();
// Set GPO port 1
reader.Config.GPO.setPortState(1, GPO_PORT_STATE.TRUE);
// To get the port state
GPO_PORT_STATE gpoPortState = reader.Config.GPO.getPortState(1);
The function reader.Config.getRadioPowerState gets the current power state of the RFID Radio Module whether it is turned ON or OFF.
// gets Radio Power state
RADIO_POWER_STATE radioPowerState = reader.Config.getRadioPowerState();
The config class contains the Antennas object. The individual antenna can be accessed and configured using the index.
The AntennaProperties is used to set the antenna configuration to individual antenna or all the antennas.
The antenna configuration (SetAntennaConfig function) comprises of Antenna ID, Receive Sensitivity Index, Transmit Power index, Transmit Frequency Index. These indexes are refers to the Receive Sensitivity table, Transmit Power table, Frequency Hop table or Fixed Frequency table respectively. These tables are available in Reader capabilities. getAntennaConfig function gets the antenna configuration for the given antenna ID.
RF Configuration
The function setAntennaRfConfig is added to configure antenna RF configuration to individual antenna. This function is similar like setAntennaConfig but includes additional parameters specific pertaining to antenna.
The configuration includes Receive Sensitivity Index, Transmit Power index, Transmit Frequency Index, RF Mode Table index. These indexes are refers to the Receive Sensitivity table, Transmit Power table, Frequency Hop table or Fixed Frequency table, RF Mode table respectively. These tables are available in Reader capabilities. Also, includes tari, transmit port, receive port and Antenna Stop trigger condition. The stop condition can be ‘n’ number of attempts, duration based. The function getAntennaRfConfig gets the antenna RF configuration for the given antenna ID.
The function getSingulationControl retrieves the current settings of the singulation control from the reader for the given Antenna ID.
To set the singulation control settings, the setSingulationControl method will be used. The following settings can be configured:
// Get Singulation Control for the antenna 2
Antennas.SingulationControl singulationControl;
singulationControl = reader.Config.Antennas.getSingulationControl(2);
The physical antenna properties of the individual antenna can be known by using getPhysicalProperties. This function gets the gain and the connectivity status of the specified antenna.